xenconsole: Fix pty handling
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Feb 2009 17:02:36 +0000 (17:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Feb 2009 17:02:36 +0000 (17:02 +0000)
commit8bb2359cd71870efc23a5980708c47484fa1da53
tree715ac0b7894115b12edd5a484b6e93914f8bd7e1
parentfecfa97c11ce8c0f01ef5d37c5079c7eb2e15c78
xenconsole: Fix pty handling

I printed the terminal attributes after openpty() and they were
garbage on the first console, valid on the second etc.
openpty() gets garbage in (uninitialized attributes MODIFIED by
cfmakeraw()). It sets the slave to the attributes requested. Using
uninitialized data for cfmakeraw->openpty results in pty attributes
that may even have the receiver disabled. Closing the slave just hides
the bug as these attributes disappear and hope the slave will be
reopened and initialized.

From: Juergen Hannken-Illjes <hannken@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/console/daemon/io.c